<template>
  <a-modal :maskClosable="false"
    title="详情"
    :width="1280"
    :visible="visible"
    :confirmLoading="confirmLoading"
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭">

    <a-spin :spinning="confirmLoading">

      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :loading="loading"
        @change="handleTableChange">


        <span slot="action" slot-scope="text, record">
                <a @click="handleEdit(record)">详情</a>
            </span>

      </a-table>

    </a-spin>
  </a-modal>
</template>

<script>
import { httpAction, putAction, getAction, postAction } from '@/api/manage'
import { FormTypes } from '@/utils/JEditableTableUtil'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'

export default {
  name: 'hHisEstimateResultModal',
  mixins: [JeecgListMixin],
  props: {
     patientId: Number,
  },
  watch: {
    patientId(newValue) {
      this.getPatient(newValue);
    }
  },
  data() {
    return {
      title: '操作',
      visible: false,

      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 },
        style: 'width: 26%; line-height: 20px; white-space: normal'
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 }
      },
      layout: {
        labelCol: { span: 8 },
        wrapperCol: { span: 14 }
      },
      confirmLoading: false,
      disableMixinCreated: true,
      dataSource: [],
      // 表头
      columns: [
        {
          title: '被护理人名称',
          align: 'center',
          dataIndex: 'name',
          width:120,
        },
        {
          title: '被护理人身份证',
          align: 'center',
          dataIndex: 'cardNo',
          width:120,
        },
        {
          title: '被护理人年龄',
          align: 'center',
          dataIndex: 'age',
          width:120,
        },
        {
          title: '被护理人性别',
          align: 'center',
          dataIndex: 'sex',
          width:120,
        },
        {
          title: '过敏史',
          align: 'center',
          dataIndex: 'allergyHistory'
        },
        {
          title: '家族史',
          align: 'center',
          dataIndex: 'familyHistory'
        },
        {
          title: '既往史',
          align: 'center',
          dataIndex: 'pastHistory'
        },
      ],
      url: {
        list: '/ch/member/list/caregivee'
      }
    }
  },
  created() {

  },
  methods: {
    edit(record) {
      const that = this
      that.visible = true
      that.queryParam.memberId=record.id;
      that.loadData()
    },
    close() {
      this.$emit('close')
      this.visible = false
    },
    handleOk() {
      const that = this
      that.close()
    },
    handleCancel() {
      this.close()
    }

  }
}
</script>

<style scoped>


</style>